package com.sinosoft.attachment;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.compass.annotations.Searchable;
import org.compass.annotations.SearchableId;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;



@Entity
@Table(name="ZYWX_ATTACHMENT")
@Cache(usage= CacheConcurrencyStrategy.READ_WRITE)
@Searchable
public class Attachment implements Serializable {

	private Long id; // ID
	private String fileName; // 资源名称
	private String filePath; // 资源路径
	private Long isRelease; // 是否发布
	private Date createTime; // 创建时间
	private Long fileType; // 资源类型
	private BigDecimal fileSize; //资源大小
	private String note;

	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@SearchableId
	@Column(name = "ID")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name="NOTE")
	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}
	@Column(name="FILESIZE")
	public BigDecimal getFileSize() {
		return fileSize;
	}

	public void setFileSize(BigDecimal fileSize) {
		this.fileSize = fileSize;
	}

	@Column(name = "FILETYPE")
	public Long getFileType() {
		return fileType;
	}

	public void setFileType(Long fileType) {
		this.fileType = fileType;
	}

	@Column(name = "FILENAME")
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "FILEPATH")
	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	@Column(name = "ISRELEASE")
	public Long getIsRelease() {
		return isRelease;
	}

	public void setIsRelease(Long isRelease) {
		this.isRelease = isRelease;
	}

	@Column(name = "CREATETIME")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}
